<template>
    <div>
        <label v-if="label">{{label}}</label>
        <slot></slot>
        <p v-if="error" class="error">{{error}}</p>
    </div>
</template>

<script>
    export default {
        props: {
            label: {
                type: String,
                default: ''
            },
        },
        data() {
            return {
                error: 'some error'
            }
        },
    }
</script>

<style scoped>
    .error {
        color: red
    }
</style>